import exifread

def layout(data):
	list_tmp=str(data).replace('[', '').replace(']', '').split(',')
	list=[ele.strip() for ele in list_tmp]
	data_sec = int(list[-1].split('/')[0]) /(int(list[-1].split('/')[1])*3600)
	data_minute = int(list[1])/60
	data_degree = int(list[0])
	result=data_degree + data_minute + data_sec
	return result

image=exifread.process_file(open('land.jpg','rb'))
time=image['Image DateTime']
print('时间：',time)
lat=layout(image['GPS GPSLatitude'])
long=layout(image['GPS GPSLongitude'])
print(f"经纬度：{float(lat): .2f}, {float(long): .2f}")
